.class public Lcom/netease/newsreader/view/NewsImageView;
.super Lcom/netease/newsreader/view/ImageViewTouch;
.source "NewsImageView.java"


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0
    .parameter "context"

    .prologue
    .line 23
    invoke-direct {p0, p1}, Lcom/netease/newsreader/view/ImageViewTouch;-><init>(Landroid/content/Context;)V

    .line 24
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0
    .parameter "context"
    .parameter "attrs"

    .prologue
    .line 19
    invoke-direct {p0, p1, p2}, Lcom/netease/newsreader/view/ImageViewTouch;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 20
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0
    .parameter "context"
    .parameter "attrs"
    .parameter "defStyle"

    .prologue
    .line 15
    invoke-direct {p0, p1, p2, p3}, Lcom/netease/newsreader/view/ImageViewTouch;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 16
    return-void
.end method


# virtual methods
.method protected getProperBaseMatrix(Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;Landroid/graphics/Matrix;)V
    .locals 12
    .parameter "bitmap"
    .parameter "matrix"

    .prologue
    const/high16 v11, 0x4040

    const/high16 v10, 0x4000

    .line 41
    invoke-virtual {p0}, Lcom/netease/newsreader/view/NewsImageView;->getWidth()I

    move-result v9

    int-to-float v6, v9

    .line 42
    .local v6, viewWidth:F
    invoke-virtual {p0}, Lcom/netease/newsreader/view/NewsImageView;->getHeight()I

    move-result v9

    int-to-float v5, v9

    .line 44
    .local v5, viewHeight:F
    invoke-virtual {p1}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getWidth()I

    move-result v9

    int-to-float v7, v9

    .line 45
    .local v7, w:F
    invoke-virtual {p1}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getHeight()I

    move-result v9

    int-to-float v0, v9

    .line 46
    .local v0, h:F
    invoke-virtual {p2}, Landroid/graphics/Matrix;->reset()V

    .line 50
    div-float v9, v6, v7

    invoke-static {v9, v11}, Ljava/lang/Math;->min(FF)F

    move-result v8

    .line 51
    .local v8, widthScale:F
    div-float v9, v5, v0

    invoke-static {v9, v11}, Ljava/lang/Math;->min(FF)F

    move-result v1

    .line 52
    .local v1, heightScale:F
    invoke-static {v8, v1}, Ljava/lang/Math;->min(FF)F

    move-result v2

    .line 55
    .local v2, scale:F
    invoke-virtual {p1}, Lcom/netease/newsreader/view/ImageViewTouch$RotateBitmap;->getRotateMatrix()Landroid/graphics/Matrix;

    move-result-object v9

    invoke-virtual {p2, v9}, Landroid/graphics/Matrix;->postConcat(Landroid/graphics/Matrix;)Z

    .line 56
    invoke-virtual {p2, v2, v2}, Landroid/graphics/Matrix;->postScale(FF)Z

    .line 58
    mul-float v9, v7, v2

    sub-float v9, v6, v9

    div-float v3, v9, v10

    .line 59
    .local v3, transX:F
    mul-float v9, v0, v2

    sub-float v9, v5, v9

    div-float v4, v9, v10

    .line 60
    .local v4, transY:F
    const/4 v9, 0x0

    cmpg-float v9, v4, v9

    if-gez v9, :cond_0

    .line 61
    const/4 v4, 0x0

    .line 64
    :cond_0
    invoke-virtual {p2, v3, v4}, Landroid/graphics/Matrix;->postTranslate(FF)Z

    .line 65
    return-void
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 0
    .parameter "canvas"

    .prologue
    .line 28
    invoke-super {p0, p1}, Lcom/netease/newsreader/view/ImageViewTouch;->onDraw(Landroid/graphics/Canvas;)V

    .line 29
    invoke-virtual {p0, p1}, Lcom/netease/newsreader/view/NewsImageView;->onDrawExtra(Landroid/graphics/Canvas;)V

    .line 31
    return-void
.end method

.method protected onDrawExtra(Landroid/graphics/Canvas;)V
    .locals 2
    .parameter "canvas"

    .prologue
    const/4 v1, 0x0

    .line 34
    invoke-virtual {p0}, Lcom/netease/newsreader/view/NewsImageView;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->getThemeSettingsHelper(Landroid/content/Context;)Lcom/netease/newsreader/util/ThemeSettingsHelper;

    move-result-object v0

    invoke-virtual {v0}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->isDefaultTheme()Z

    move-result v0

    if-nez v0, :cond_0

    .line 35
    const/16 v0, 0x7d

    invoke-virtual {p1, v0, v1, v1, v1}, Landroid/graphics/Canvas;->drawARGB(IIII)V

    .line 37
    :cond_0
    return-void
.end method
